<?php

namespace Common\Model;
use think\Model;

class UserTechnologyModel extends BaseModel{

	//追加属性
    public $append = [
        'add_time_text',
        'cate_name'
	];

    /**
     * 分类名称
     * @param $value
     * @param $data
     * @return mixed
    */
    public function getCateNameAttr($value, $data){
        $str = '';
        $cate_model = M('user_mysql_cate');
        $str = $cate_model->where(['id'=>$data['cat_id']])->getField('title');
		return $str;
    }
}